﻿using LardonPokerSimulator.Model.Deck;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LardonPokerSimulator.Model
{
    public class Hand
    {
        private static int START_CARD_MIN = 2;

        private Player _handsPlayer = null;
        private List<Card> _handsCards = new List<Card>();

        public Hand(Player aPlayer)
        {
            this._handsPlayer = aPlayer;
            this.Init();
        }

        private void Init()
        {
            for (int i = 0; i < START_CARD_MIN; i++)
            {
                this._handsCards.Add(Cards.Instance.PickRandomCard());
            }

            this._handsCards.Sort();
        }

        public List<Card> HandsCards
        {
            get
            {
                return this._handsCards;
            }
        }

        public void PickNewCard()
        {
            this._handsCards.Add(Cards.Instance.PickRandomCard());
            this._handsCards.Sort();
        }

    }
}
